package org.example.array;

public class test1 {
    public static void main(String[] args) {
        int[] arr = {1,2,3};
        System.out.println("一维数组");
        for (int s : arr) {
            int address = System.identityHashCode(s);//identityHashCode(s)该方法所得到的是已经被处理过的地址值
            System.out.println("值："+s+",地址："+Integer.toHexString(address));
        }
        int[][] arr2={
                {1,2,3},
                {4,5,6},
                {1,2,3},
                {4,5,6}
        };
        System.out.println("二维数组");
        System.out.println(arr2[0]);
        System.out.println(arr2[1]);
        System.out.println(arr2[2]);
        System.out.println(arr2[3]);
    }
}
